//
// Created by Jisam on 2024/6/30.
//
#include <bits/stdc++.h>
#define i64 long long
using namespace  std;
const int N = 1e5+5;
void solve(){

}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    i64 m,n;
    cin >> n >> m;
    i64 ans1 = 0,ans2 = 0;
    for(i64 i = 1 ; i <= n ; i ++){
        for(i64 j = 1; j <= m ; j ++){
            ans1 += min(i,j);
            ans2 += i*j;
        }
    }
    cout << ans1 <<" " << ans2 - ans1;
    return  0;
}